package com.itlong.cloud.operate.resource;

import com.itlong.cloud.POJO.PO.PersonPO;
import com.itlong.cloud.operate.service.IOperatePersonService;
import com.itlong.cloud.user.operate.IOperatePersonClient;
import org.slf4j.Logger;import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <desc>
 *      设备服务暴露接口实现类。
 * </desc>
 *
 * @createDate 2017/08/29
 */
@RestController
public class OperatePersonServiceResource implements IOperatePersonClient {

    private static final Logger LOG = LoggerFactory.getLogger(OperatePersonServiceResource.class);

    @Autowired
    IOperatePersonService iPersonService;


    /**
     * <desc>
     *      DEMO示例。
     * <desc/>
     *
     * @param param id
     * @return hello
     * @author Wenchao.L
     * @createDate 2017/08/29
     */
    @Override
    @RequestMapping(path = "/userSayHello2/{param}", method = {RequestMethod.GET})
    public String userSayHello2(@PathVariable(value = "param") String param) {
        PersonPO person = iPersonService.getPersonById(2079);
        System.out.println(person.getUser_name()+"789");
        return "Service";
    }

}
